<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style='width:100%;height:100%;overflow:scroll;overflow-x:hidden'>
	<div class="container bs-docs-container" style="width:100%;">
		<div class="row">
			<form role="pageForm" class="form-inline" action="<%=path%>/system/sysDictData/queryPageList.do" method="post"  id="pageForm" class="form-search">
				<div  class="col-md-12" style="width:100%;padding:5px;">
					<div class="panel panel-default">
						  <div class="panel-heading">列表界面</div>
						  <div class="panel-body">
						  		<div class="search">
						  			<div class="form-group col-sm-4">
										<label for="typeId" class="col-sm-4 control-label" style="text-align:left;">数据类型</label>
								 		<div class="col-sm-8">
								 			 <select name="typeId" id="typeId"  class="selectpicker show-tick form-control" data-live-search="true">
								 			 	  <option value="">请选择</option>
								 			 <c:if test="${not empty list}">
								 			 <c:forEach items="${list}" var="info" varStatus="vs">
										          <option value="${info.typeId}">${info.typeName}</option>
										     </c:forEach>
										     </c:if>
										     </select>
						           		</div>
						            </div>
									<div class="form-group col-sm-4">
										<label for="dataCode" class="col-sm-4 control-label" style="text-align:left;">数据编码</label>
								 		<div class="col-sm-8">
								 			<input type="text" name="dataCode" id="dataCode" placeholder="数据编码" value="${sysDictData.dataCode}" class="form-control">
						           		</div>
						            </div>
									<div class="form-group col-sm-4">
										<label for="dataContent" class="col-sm-4 control-label" style="text-align:left;">数据内容</label>
								 		<div class="col-sm-8">
								 			<input type="text" name="dataContent" id="dataContent" placeholder="数据内容" value="${sysDictData.dataContent}" class="form-control">
						           		</div>
						            </div>
								 	<div class="form-group col-md-6 col-sm-6 col-xs-12">
				     			 		<button type="submit" class="btn btn-sm btn-primary col-md-offset-1">搜索</button>
								 		<a type="button" class="btn btn-sm btn-primary" href="<%=path%>/system/sysDictData/toMerge.do" style="margin-left: 10px;">新增</a>
				       			 	</div>
						  		</div>
						        <div class="col-md-12 col-sm-12 col-xs-12 table-responsive"  style="padding-top: 5px;">
						        <table class="table table-striped table-condensed">
							        <thead>
							        	<tr class="active">
							        		<th>序号</th>
							        		<th>类型名称</th>
											<th>类型编码</th>
											<th>数据编码</th>
											<th>数据内容</th>
											<th>数据描述</th>
											<th>显示顺序</th>
				                			<th>操作</th>
			                			</tr>
							        </thead>
							        <tbody>
									        <c:choose>
												<c:when test="${not empty pagination}">
													<c:forEach items="${pagination.items}" var="info" varStatus="vs">
														<tr>
															<td>${vs.index+1}</td>
															<td>${info.typeName}</td>
															<td>${info.typeCode}</td>
															<td>${info.dataCode}</td>
															<td>${info.dataContent}</td>
															<td>${info.description}</td>
															<td>${info.displayOrder}</td>
															<td class="last">
																<a href="<%=path%>/system/sysDictData/toMerge.do?dataId=${info.dataId}">修改</a>
																&nbsp;&nbsp;
																<a onclick="HF.confirmx('确定删除该条数据','<%=path%>/system/sysDictData/delete.do?dataId=${info.dataId}')">删除</a>&nbsp;&nbsp;
															</td>
														</tr>
													</c:forEach>
												</c:when>
												<c:otherwise>
														<tr><td colspan="100">没有相关数据</td></tr>
												</c:otherwise>
											</c:choose>
							         </tbody>
							    </table>
							    </div>
								<div>
									<%@ include file="/WEB-INF/common/pagination.jsp"%>
								</div>
						  </div>	
					</div>
				</div>  
			</form>
		</div>
	</div>
</body>
</html>